package com.example.thymeleaf.service.impl;

import com.example.thymeleaf.entity.CityEntity;
import com.example.thymeleaf.mapper.CityEntityMapper;
import com.example.thymeleaf.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @ClassName UserServiceImpl
 * @Author fuzhixuan
 * @Date 2022/1/20 11:14
 */
@Service
public class CityServiceImpl implements CityService {
    @Autowired
    private CityEntityMapper cityEntityMapper;

    @Override
    public List<CityEntity> getAll() {
        return cityEntityMapper.getAll();
    }

    @Override
    public CityEntity getCityById(Integer id) {
        return cityEntityMapper.getCityById(id);
    }

    @Override
    public void updateCity(CityEntity cityEntity) {
        cityEntityMapper.update(cityEntity);
    }
}
